package realm.inorder.itmill.ui.panel.logged.cadastro.cliente;

import org.openinsula.jazz.stereotype.Binding;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import realm.inorder.itmill.ui.panel.logged.LoggedLayoutController;

import com.itmill.toolkit.ui.FormLayout;
import com.itmill.toolkit.ui.TextField;

@Component
public class ClienteCadastroPanel extends AbstractClientePanel {
	
	@Binding(beanType=ClienteController.class, property="cliente.pessoa.nome")
	private TextField nomeField;
	
	@Binding(beanType=ClienteController.class, property="cliente.pessoa.cpf")
	private TextField cpfField;

	@Autowired
	private LoggedLayoutController loggedLayoutController;

	public ClienteCadastroPanel() {
		super("Cadastro de Clientes *");
	}

	public void initComponents() {
		FormLayout layout = new FormLayout();
		
		layout.addComponent(nomeField = new TextField("Nome*:"));
		layout.addComponent(cpfField = new TextField("CPF*:"));
		
		this.addComponent(layout);
	}

	public void showClienteCadastroPanel() {
		loggedLayoutController.showClienteCadastroPanel();
	}
	
	public void initActions() {
		// TODO Auto-generated method stub

	}

}
